<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>MyPetStore</title>
    <link rel="stylesheet" href="../css/jpetstore.css" type="text/css" media="screen" />

</head>
<body>
  <div th:replace="common/top"></div>
  <div id="BackLink">
    <a href="/catalog/view">Return to Main Menu</a>
  </div>



<h2>My Orders</h2>

<div id="Catalog">

    <div align="middle">
        <h1>My Orders</h1>

        <table>
            <tr>
                <th>Order ID</th>
                <th>Date</th>
                <th>Total Price</th>
            </tr>
            <tr th:each="order:${orderList}">
                <td>
                    <a th:href="@{/order/viewOrder(orderId=${order.orderId})}" th:text="${order.orderId}"></a>
                </td>
                <td>
                    <span th:text="${#dates.format(order.orderDate, 'yyyy-MM-dd HH:mm:ss')}"></span>
                </td>
                <td th:text="${order.totalPrice}">

                </td>
            </tr>
        </table>
    </div>

<br/>

<div th:replace="common/bottom">

</div>
</body>
</html>